<template>
  <view style="padding-top: 70rpx">
    <u-navbar :title="title" :autoBack="true" :titleStyle="{color: titleColor}" :bgColor="bgColor">
      <view slot="left">
        <u-icon name="arrow-left" size="40" :color="titleColor"></u-icon>
      </view>
      <view slot="right" v-if="right">
        <view @click="right.fun">{{right.name}}</view>
      </view>
    </u-navbar>
  </view>
</template>
<script>

import {gotoPage} from "../utils/common";

export default {
  name: "TopBar",
  methods: {gotoPage},
  props: {
    title: {
      type: String,
      default: null
    },
    right: {
      type: Object,
      default: null
    },
    bgColor: {
      type: String,
      default: 'transparent'
    },
    titleColor: {
      type: String,
      default: '#000000'
    }
  },
}
</script>


<style scoped lang="scss">
  .top{
    z-index: -1;
    position: fixed;
    top: 0;
    left: 0;
    background: url("https://cdn.uviewui.com/uview/album/1.jpg");
  }
</style>
